.. file:hybridcalculator class .. _hybridcalculator class: .. file:hybridcalculator class - description .. _hybridcalculator class - description: ====================== HybridCalculator class ====================== The HybridCalculator provides a regular ASE calculator interface, but internally combines results from multiple different calculators and interactions between them. Currently you can use it for potential energy and force calculations (stress calculations not yet implemented). Like with any ASE calculator, you can also run molecular dynamics and local geometry optimizations with it, but global energy optimization schemes that require a stress implementation will naturally not work due to missing stress implementation. The following figure demonstrates the simplified workflow comparison of a regular ASE calculation vs. Pysic's hybrid QM/MM calculation. .. image:: figs/workflow.png :scale: 60 % :align: center HybridCalculator is meant to be used in conjunction with the classes :class:`~pysic.subsystem.SubSystem` and :class:`~pysic.interaction.Interaction`. See also the :ref:`run example `. .. file:mechanical embedding .. _mechanical embedding: Mechanical Embedding -------------------- The electrostatic interaction between subsystems is treated with the mechanical embedding scheme. The Coulomb interaction is thus calculated in the MM level by assigning point charges for the atoms in the primary and secondary system. The charges in the secondary system are static and can be obtained from experimental data or theoretical calculations. Rather than also parametrizing the charges in the primary system, in Pysic they can be dynamically calculated by using the electron density provided by the DFT calculator. The positive charge of the nuclei can be accurately modeled as an atom-centered point charge. The effect of the negative electron charge density is approximated also as a single atom-centered point charge. The value of this point charge is calculated by integrating the electron charge density inside a certain volume. Primarily Pysic uses the Bader partitioning scheme to determine these volumes, but a spherical partitioning scheme is also available. Hydrogen links in Pysic ----------------------- The covalent bonds between subsystems are treated with the link atom approach, i.e. hydrogen atoms are used to cap the bonds in the primary QM system. The hydrogen link atoms are placed on the line connecting the two atoms that form the bond. The exact position of the link atoms in this line can be controlled with the CHL parameter, given when defining the links in :meth:`~pysic.interaction.add_hydrogen_links`. The link atoms automatically keep their correct position when running dynamics or geometry optimization. .. file:hybridcalculator class - autogenerated .. _hybridcalculator class - autogenerated: List of methods --------------- The following methods form the basis for creating and performing hybrid simulations with HybridCalculator: - :meth:`~pysic.hybridcalculator.HybridCalculator.add_subsystem` - :meth:`~pysic.hybridcalculator.HybridCalculator.add_interaction` - :meth:`~pysic.hybridcalculator.HybridCalculator.get_potential_energy` - :meth:`~pysic.hybridcalculator.HybridCalculator.get_forces` - :meth:`~pysic.hybridcalculator.HybridCalculator.print_energy_summary` - :meth:`~pysic.hybridcalculator.HybridCalculator.print_force_summary` - :meth:`~pysic.hybridcalculator.HybridCalculator.print_time_summary` - :meth:`~pysic.hybridcalculator.HybridCalculator.print_interaction_charge_summary` - :meth:`~pysic.hybridcalculator.HybridCalculator.view_subsystems` Full documentation of the HybridCalculator class ------------------------------------------------ .. currentmodule:: pysic.hybridcalculator .. autoclass:: HybridCalculator :members: :undoc-members: